<form [formGroup]="groupForm" id="detail" class="am-g" (ngSubmit)="onSubmit()">

  <div formArrayName="Arr">
    <div *ngFor="let form of ArrForm.controls; let i=index;" [formGroupName]="i">
      <input type="text" formControlName="control1">
      <input type="text" formControlName="control2">
      <input type="text" formControlName="Name">
      <input type="text" formControlName="Code">
      <input type="text" formControlName="Level">
      <input type="text" formControlName="Remark">
      <!-- 增加移除表单 -->
      <button (click)="removeForm(i)">删除表单</button>
      <button (click)="newForm()" *ngIf="(i+1) == ArrForm.controls.length">增加表单</button>
    </div>
  </div>
  <button type="submit" [disabled]="!groupForm.valid">按钮</button>
</form>
